.TH E1432_SET_RANGE 3 E1432
.SH NAME
.nf
e1432_set_range \- Set range of E1432
e1432_get_range \- Get current range of E1432
.fi
.IX e1432_set_range(3) 3
.IX e1432_get_range(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_range(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 range)
SHORTSIZ16 e1432_get_range(E1432ID hw, SHORTSIZ16 ID, FLOATSIZ32 *range)
.cE
.SH DESCRIPTION
\fIe1432_set_range\fR sets the range, of a single channel or group
of channels \fIID\fR, to the value given in \fIrange\fR.

\fIe1432_get_range\fR returns the current value of the range, of a
single channel or group of channels \fIID\fR, into a memory location
pointed to by \fIrange\fR.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIrange\fR is the full scale range in volts.  Signal inputs whose
absolute value is larger than full scale will generate an ADC overflow
error.  (Actually, there is several dB of overhead before the ADC will
overflow, to avoid spurious overflow indications.)

The actual range that is set will be the nearest legal range value
that is greater than or equal to the value specified by the
\fIrange\fR parameter.

For input channels, the \fIrange\fR is used only when the input mode
is Voltage or ICP (see \fIe1432_set_input_mode\fR).  When the input
mode is Charge, the \fIrange_charge\fR parameter is used instead (see
\fIe1432_set_range_charge\fR).  When the input mode is microphone
mode, the \fIrange_mike\fR parameter is used instead (see
\fIe1432_set_range_mike\fR).

For source channels the range specifies an overall maximum signal
level (typically on a range DAC reserved for that purpose), and can't
be changed instantaneously during output.  To change the signal
amplitude during output, use e1432_set_amp_scale, which can scale the
output level by an (almost) arbitrary scale factor.

For tach channels, neither range nor amplitude are used.

This parameter may also be set with \fIe1432_set_analog_input\fR.
.SH "RESET VALUE"
After a reset, input channels have the \fIrange\fR set to 10 volts.
Source channels have the \fIrange\fR set to the minimum legal source
range (and the source is also inactive, so no signal is produced).
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_analog_input, e1432_set_amp_scale, e1432_set_input_mode,
e1432_get_range_limits, e1432_set_range_charge, e1432_set_range_mike,
e1432_bob
.ad
